package com.hyt.it.ogt.ks.util;

import java.time.LocalDateTime;

import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.WritingConverter;

/**
 * @author wuyingge
 * @ClassName LocalDateTimeConvter.java
 * @Description Direction: Java -> MongoDB
 * @createTime 2021年11月12日 17:59:00
 */
@WritingConverter
public class LocalDateTimeToMongodb implements Converter<LocalDateTime, String> {

    @Override
    public String convert(LocalDateTime source) {
        return source.toString() + 'Z';
    }
}
